<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ page import="login.Login" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>
<jsp:useBean id="bean" class="login.Login"></jsp:useBean>
<jsp:setProperty property="*" name="bean"/>
<%
	String sessionID = (String)session.getAttribute("mid");
	if(bean.delete()){%>
	<script>
		alert("정상적으로 탈퇴되었습니다.");
		location.href='../ColdEyes/logout.jsp';
	</script>
	<%}else{ %>
	<script>
		alert("패스워드가 올바르지 않습니다. 다시 확인하십시오.");
		location.href='Main.jsp?inc_content=../login/myinfo.jsp&mid=<%=sessionID %>';
	</script>
	<%} %>

</body>
</html>